package com.guomao.clients;

import com.guomao.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//value是服务提供者的服务名
//path是服务提供者控制器的基准路径
@FeignClient(value = "DISTRIBUTED-USER", path = "user")
public interface UserFeign {

    //服务提供者控制器中的方法签名
    @GetMapping("/getUser/{id}")
    public User findByID(@PathVariable("id") Long id);

//    http://localhost:8081/user/getUser/1

//  GET http://localhost:8081/user/getUser/id
}
